<%@ page language="java" pageEncoding="UTF-8"%>
<div class="container">
	<div class="row">
        <div class="col-sm-9 col-md-9">
			<div class="panel panel-default">
				<div class="panel-body">
					<h2>
						<img ng-src="{{software.software.icon | path}}" style="width:50px;height:50px;"> {{software.software.title}}
						
						<span class="label label-danger" ng-show="software.software.recommend_time!=0">推荐</span>
						
						<span class="btn-group pull-right" ng-show="software.module!=null && software.module.length!=0">
							<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
								管理
								<span class="caret"></span>
							</button>
							<ul class="dropdown-menu" role="menu">
								<li ng-repeat="module in software.module">
									<a href="javascript:void(0);" ng-click="handle(software.software,module)">{{module.name}}</a>
								</li>
							</ul>
						</span>
						
					</h2>
					<ol class="breadcrumb clearfix">
						<span class="pull-right">
							<span style="cursor: pointer;" ng-click="favorite.create(software)" ng-show="software.favorite==null || !software.favorite" message="'收藏'" tooltip>
								<i class="glyphicon glyphicon-star-empty"></i>
							</span>
							
							<span style="cursor: pointer;" ng-click="favorite.remove(software)" ng-show="software.favorite" message="'取消收藏'" tooltip>
								<i class="glyphicon glyphicon-star"></i>
							</span>
							收藏 + {{software.software.favorite_count}}
						</span>
					</ol>
					
					<div>
						<source model="software.software.introduce"></source>
					</div>
					
					<hr/>
					
					<div>
						<a ng-show="software.software.home_page!=null && software.software.home_page!=''" ng-href="{{software.software.home_page}}" class="btn btn-primary" style="margin-right: 30px;" target="_black">软件首页</a>
						
						<a ng-show="software.software.doc_url!=null && software.software.doc_url!=''" ng-href="{{software.software.doc_url}}" class="btn btn-primary" style="margin-right: 30px;" target="_black">文档地址</a>
						
						<a ng-show="software.software.download_url!=null && software.software.download_url!=''" ng-href="{{software.software.download_url}}" class="btn btn-primary" style="margin-right: 30px;" target="_black">下载地址</a>
					</div>
				</div>
			</div>
			
			<div class="panel panel-default">
				<div class="panel-heading">
					{{software.software.name}}相关讨论
				</div>
				<div class="panel-body">
					<div class="alert alert-info" ng-show="discuss==null || discuss.data==null || discuss.data.length==0">
						<i class="glyphicon glyphicon-exclamation-sign"></i> 暂时没有讨论
					</div>
					
					<div ng-show="discuss!=null && discuss.data!=null && discuss.data.length!=0">
						<div ng-repeat="dis in discuss.data">
							<include path="/discuss_layout.html"></include>
							<hr/>
						</div>
					</div>
					
					<paginate page-count="discuss.page_count" sum="discuss.data_sum" pn="discuss.pn" click="find"></paginate>
				</div>
			</div>
			
		</div>
		
		<div class="col-sm-3 col-md-3">
			<user-card uid="software.software.author.id" title="作者"></user-card>
			
			<div class="panel panel-default">
				<div class="panel-body" style="text-align: center;">
					<h4 style="color: #40AA53;">
						没有你想要的答案?
					</h4>
					
					<a ng-href="#/discuss/create?tag={{software.software.name}}" class="btn btn-success">我要提问/讨论</a>
				</div>
			</div>
		</div>
	</div>
</div>